<template>
  <div>
    <ul class="infinite-list" v-infinite-scroll="load" style="overflow:auto">
      <li v-for="(i, index) in count" class="infinite-list-item" :key="index">{{ i }}</li>
    </ul>

    <el-image 
      style="width: 100px; height: 100px"
      :src="url" 
      :preview-src-list="srcList">
    </el-image>
  </div>
</template>

<script>
  export default {
    data () {
      return {
        count: 0,
        url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
        srcList: [
          'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg',
          'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg'
        ]
      }
    },
    methods: {
      load () {
        this.count += 2
      }
    }
  }
</script>

<style lang="less" scoped>
.infinite-list {
    height: 300px;
    padding: 0;
    margin: 0;
    list-style: none;
    .infinite-list .infinite-list-item {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 50px;
      background: #e8f3fe;
      margin: 10px;
      color: #7dbcfc;
    }
}
</style>